﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using UtilityLibrary.WinControls;
namespace WHC.Security.UI
{
    public partial class Frm_MainToolWindow : DockContent
    {
        
         private void InitializeOutlookbar()
        {

            #region 销售管理

            OutlookBarBand outlookBackRecvBand = new OutlookBarBand("权限管理");
            outlookBackRecvBand.SmallImageList = this.imageList;
            outlookBackRecvBand.LargeImageList = this.imageList;
            outlookBackRecvBand.Items.Add(new OutlookBarItem("用户管理", 0));
            outlookBackRecvBand.Items.Add(new OutlookBarItem("组织机构管理", 1));
            outlookBackRecvBand.Items.Add(new OutlookBarItem("角色管理", 2));
            outlookBackRecvBand.Items.Add(new OutlookBarItem("功能管理", 3));
 
            outlookBackRecvBand.Background = SystemColors.AppWorkspace;
            outlookBackRecvBand.TextColor = Color.White;
            outlookBar1.Bands.Add(outlookBackRecvBand);

            #endregion

            outlookBar1.Dock = DockStyle.Fill;
            outlookBar1.SetCurrentBand(0);
            //OutlookBarBand bb = outlookBar1.Bands[1];
            // bb.Items[0]
            outlookBar1.ItemClicked += new OutlookBarItemClickedHandler(OnOutlookBarItemClicked);
            outlookBar1.ItemDropped += new OutlookBarItemDroppedHandler(OnOutlookBarItemDropped);

            //outlookBar1.FlatArrowButtons = true;
            this.panel1.Controls.AddRange(new Control[] { outlookBar1 });
        }
         private void OnOutlookBarItemClicked(OutlookBarBand band, OutlookBarItem item)
        {
            MainForm.GetMainForm().ShowContent(item.Text);
           
        }

         private void OnOutlookBarItemDropped(OutlookBarBand band, OutlookBarItem item)
         {
       
         }
         public Frm_MainToolWindow()
        {
            
            InitializeComponent();
            InitializeOutlookbar();
        }

         private void Frm_MainToolWindow_Load(object sender, EventArgs e)
         {

         }
    }
}
